package com.hunktimes.wholesale.vm

import androidx.lifecycle.MutableLiveData
import com.hunktimes.wholesale.base.BaseViewModel
import com.hunktimes.wholesale.extension.launch
import com.hunktimes.wholesale.net.WholeSaleRepository

/**
 * Author: Delete
 * Date: 2020/8/14 10:22
 * Description:
 *
 */
class OrderDetailVM : BaseViewModel() {
    val orderDetailResult = MutableLiveData<List<String>>()

    fun queryOrderDetail(orderId: String) {
        launch({
            val resp = WholeSaleRepository.queryOrdersByType(orderId)
            val orders = resp.data
            orders?.let {
                orderDetailResult.value = it
            }
        })
    }


}